package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("client_user")
@NoArgsConstructor
public class ClientUser implements Serializable {

    private static final long serialVersionUID = 1L;

    public ClientUser(String userNickname, String userImage, String userOpenid, String sessionKey) {
        this.userNickname = userNickname;
        this.userImage = userImage;
        this.userOpenid = userOpenid;
        this.sessionKey = sessionKey;
    }

    /**
     * 用户表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户昵称
     */
    @TableField("user_nickname")
    private String userNickname;

    /**
     * 用户头像
     */
    @TableField("user_image")
    private String userImage;

    /**
     * 电话
     */
    @TableField("user_phone")
    private String userPhone;

    /**
     * openid
     */
    @TableField("user_openid")
    private String userOpenid;

    /**
     * session_id
     */
    @TableField("session_key")
    private String sessionKey;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
